package Practice.Practice_01;

import java.util.Scanner;

public class demo10 {
    public static void main(String[] args) {
        int sum1 = add(1, 2);
        int sum2 = add(1, 2, 3);
        double sum3 = add(1.2, 2.3);
        System.out.println("sum1 = " + sum1);
        System.out.println("sum2 = " + sum2);
        System.out.println("sum3 = " + sum3);
        Scanner sc = new Scanner(System.in);
        System.out.println("输入 a");
        int a = sc.nextInt();
        System.out.println("输入 b");
        int b = sc.nextInt();
        number(a,b);
    }
    public static int add(int a, int b) {
        return a + b;
    }
    public static int add(int a, int b, int c) {
        return a + b + c;
    }
    public static double add(double a, double b) {
        return a + b;
    }
    public static void number(int a, int b){
        a = a + b;
        b = a - b;
        a = a - b;
        System.out.println("a = " + a + ", b = " + b);
    }
}
